<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>列表</title>
<link rel="stylesheet" href="/static/layui/css/layui.css" media="all">
<script src="/static/layui/layui.all.js"></script>
<script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
<script src="/static/js/webutil.js?t=123"></script>
<style type="text/css">
.t_lable{text-align:right;background-color: #F8F8F8}
.t_content{text-align:left}
</style>
</head>
<#import "/util/upload.ftl" as Upload>
<body>
	<div class="layui-fluid">
		<div class="layui-row">
			<form class="layui-form" id="table_form" action="">
			<input type="hidden" name="id" value="${param.id!''}">
			<input type="hidden" name="delflag" value="${param.delflag!''}">
			<table class="layui-table" lay-size="sm">
			  <colgroup>
			    <col width="15%">
			    <col width="35%">
			    <col width="15%">
			    <col width="35%">
			  </colgroup>
			  <tbody>
			  	<tr>
			  	  <td class="t_lable">角色名称</td>
			      <td class="t_content">
			      	<input type="text" name="name" value="${param.name!''}" lay-verify="required" class="layui-input">
			      </td>
			  	</tr>
			  </tbody>
			</table>
			<#if !viewMode??>
			<hr>
			<button class="layui-btn layui-btn-sm" lay-submit="" lay-filter="*" style="float: right">
				<i class="layui-icon">&#xe618;</i>保存
			</button>
			</#if>
			<br>
			<br>
			<br>
			</form>
		</div>
	</div>
</body>
<script type="text/javascript">
	var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
	var postUrl="/base/sysrole/save.json";
	
	$(function(){
		<#if viewMode??>
		$('input').attr("readonly","readonly");
		$('select').attr("disabled","disabled");
		$('textarea').attr("readonly","readonly");
		$('button').attr("disabled","disabled");
		$("button").addClass("layui-btn-disabled");
		</#if>
		layui.form.render();
	});
	
	layui.form.on('submit(*)', function(formData) {
		postData(postUrl);
		return false;
	});
</script>
</html>